

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

 public class TesterServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {

	private static final long serialVersionUID = 1L;

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String path = this.getServletContext().getInitParameter("IMAGES_DIRECTORY");
		File imagesDir = new File(path);
		String[] list = imagesDir.list();
		for(String f : list) {
			System.out.println(f);
		}
	}  	  	  	    
}